@extends('layouts.main')

@section('title', '添加合同分类')

@section('content')
<h3>@yield('title')</h3>
<div class="btn-group" role="group">
  	<a href="{{ action('BaseData\CategoryContractController@index') }}" class="btn btn-primary">返回列表</a>
</div>

<form class="form-horizontal" method="post" action="{{ action('BaseData\CategoryContractController@store') }}">
    @csrf

    <div class="form-group">
		<label for="name" class="col-sm-2 control-label">分类名称</label>
		<div class="col-sm-3">
			<input class="form-control" id="name" name="name" placeholder="请输入分类名称" value="{{ old('name') }}">
			@if($errors->first('name'))
			<p class="help-block error">{{ $errors->first('name') }}</p>
			@endif
		</div>
    </div>
	
	<div class="form-group">
		<label for="is_scale" class="col-sm-2 control-label">是否计算规模</label>
		<div class="col-sm-3">
			<select class="form-control" id="is_scale" name="is_scale">
				@foreach(config('report.yes_no') as $key => $value)
				<option value="{{ $key }}" @if(old('is_scale') == $key) selected @endif>{{ $value }}</option>
				@endforeach
			</select>
		</div>
    </div>

    <div class="form-group">
		<div class="col-sm-offset-2 col-sm-10">
			<button type="submit" class="btn btn-primary">提交</button>
		</div>
    </div>
  
</form>

@endsection